import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userId:1
  },
  mutations: {
    setUserId(state,val){
      state.userId=val
    }
  },
  actions: {
    setUserIdActive(context,val){
      setTimeout(()=>{
        context.commit("setUserId",val)
      },0)

    }
  },
  modules: {
  }
})
